from flask import Flask
from config import *

app = None

def get_app():
    global app
    if app:
        return app
    app = Flask(__name__)
    app.config["SQLALCHEMY_DATABASE_URI"] = SQLALCHEMY_DATABASE_URI
    register_all_dashboards(app)
    return app


def register_all_dashboards(app):
    from view.dashboards.resource.dashboard import ResourceDashboard
    ResourceDashboard(app)
    
